require("../css/advertisement.less")

// 先运行dom的css样式,再加载js
window.onload = function () {
    let jump = document.querySelector(".jump")
    let timer = document.querySelector(".timer span")
    // 能监听的位置越大越好,增加客户体验感
    let  t = setInterval(function(){
        if (parseInt(timer.innerHTML) - 1 == 0) {
            location.href = "login.html"
            clearInterval(t)
        } 
        timer.innerHTML = parseInt(timer.innerHTML) - 1
    },1000)
    jump.addEventListener("click", function () {
        location.href = "login.html"
    })
}